package net.lab1024.sa.admin.module.business.summary.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import net.lab1024.sa.base.common.json.deserializer.FileKeyVoDeserializer;

/**
 * 报价单汇总明细 新建表单
 *
 * @Author zzx
 * @Date 2025-08-30 15:52:51
 * @Copyright zzx
 */

@Data
public class SummaryItemsAddForm {

    @Schema(description = "报价单汇总明细", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "报价单汇总明细 不能为空")
    private Long summaryItemId;

    @Schema(description = "汇总id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "汇总id 不能为空")
    private Long summaryId;

    @Schema(description = "序号")
    private Integer serialNumber;

    @Schema(description = "品名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "品名 不能为空")
    private String quotationName;

    @Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "规格 不能为空")
    private String specifications;

    @Schema(description = "用量")
    private BigDecimal usagee;

    @Schema(description = "单价")
    private BigDecimal unitPrice;

    @Schema(description = "单位")
    private String units;

    @Schema(description = "报价长度")
    private BigDecimal quotationLong;

    @Schema(description = "报价高度")
    private BigDecimal quotationHeight;

    @Schema(description = "图纸")
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String drawingPath;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "禁用状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "禁用状态 不能为空")
    private Integer disabledFlag;

    @Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "删除状态 不能为空")
    private Integer deletedFlag;

    @Schema(description = "创建人ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "创建人ID 不能为空")
    private Long createUserId;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "创建时间 不能为空")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "更新时间 不能为空")
    private LocalDateTime updateTime;

    @Schema(description = "状态")
    private Integer status;

    @Schema(description = "更新人用户id")
    private Long updateUserId;

    @Schema(description = "类型： 商品/合计")
    private Integer type;

    @Schema(description = "报价单id")
    private Long quotationId;

}